import request from "@/utils/request";

//根据项目id获取发票列表
export const getReceiptListByProjectIdApi = projectId => {
    return request({
        url: `/receipt/${projectId}`,
        method: "get"
    })
}

//根据项目id新建发票
export const createReceiptApi = (projectId, data) => {
    return request.postForm(`/receipt/${projectId}`, data)
}
//根据项目id和发票id删除发票
export const deleteReceiptByIdApi = (projectId, id) => {
    return request({
        url: `/receipt/${projectId}/${id}`,
        method: "delete"
    })
}
//学校管理员修改发票报销额度
export const putReceiptReimburseByIdApi = (projectId,receiptId, reimburse) => {
    return request({
        url: `/receipt/${projectId}/${receiptId}/${reimburse}`,
        method: "put"
    })
}
